fun main() {
    //可变列表
    val mutableList = mutableListOf("Jason", "Jack", "Jacky")
    mutableList.add("Jimmy")
    mutableList.remove("Jack")

    //只读列表和可变列表相互转换
    listOf("Jason", "Jack", "Jacky").toMutableList()
    mutableListOf("Jason", "Jack", "Jacky").toList()

    //mutato函数添加元素
    mutableList += "Jimmy"
    //删除元素
    mutableList -= "Jason"
    //条件删除元素
    mutableList.removeIf { it.contains("Jack") }
    println(mutableList)
}